package com.aiti.lulian.service;

import com.aiti.base.core.base.service.BaseService;
import com.aiti.base.core.utils.message.Message;
import com.aiti.lulian.dto.CustomerManagementDto;
import com.aiti.lulian.entity.CustomerManagement;
import com.aiti.lulian.vo.CustomerManagementVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface ICustomerManagementService extends BaseService<CustomerManagement> {
    List<CustomerManagementVo> findCustomerListPage(Page page, CustomerManagementDto customerManagementDto, String userId);

    CustomerManagementVo getCustomerById(String baseId);

    Message addCustomer(CustomerManagementDto customerManagementDto);

    Message updateCustomer(CustomerManagementDto customerManagementDto);

    int updateCustomerById(String baseId);

    /***
     * 获取员工客户数量
     * @param enterpriseId 企业Id
     */
    List<Map> getCustomerCountByEmployee(Page<List<Map>> page,String enterpriseId,String userId);

    /***
     * 查询客户总数、成交客户、潜在客户
     * @param enterpriseId
     */
    Map getCustomTotal(String enterpriseId,String userId);

    List<CustomerManagementVo> getCustomerList(CustomerManagementDto customerManagementDto, Page<CustomerManagementVo> page);

    Message removeCustomerByBaseIds(String[] baseIds);

    Message forwardCustomer(CustomerManagementDto customerManagementDto);

    Message saveCustomer(CustomerManagementDto customerManagementDto);

    Message getCustomerDetails(CustomerManagementDto customerManagementDto);

    Message editCustomer(CustomerManagementDto customerManagementDto);

    Message editCustomerBatch(CustomerManagementDto customerManagementDto);

    Message editCollaborator(CustomerManagementDto customerManagementDto);

    Message getCollaboratorList(List<String> customerIds);

    Message importCustomerBatch(MultipartFile file, String mode, String enterpriseId, String userId, String deptId, String isPublic) throws IOException;

    Message updateContact(CustomerManagementDto customerManagementDto);

    Message getFollowListByCustomerId(String customerId);
}